<html>
<head><meta charset="utf-8"><title>error when test clippy · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html">error when test clippy</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214430547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214430547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bimo <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214430547">(Oct 24 2020 at 14:26)</a>:</h4>
<p>Hi.  i have issue when i try to run <code>cargo test</code> on rust-clippy.<br>
i was following basic document up to <a href="https://github.com/rust-lang/rust-clippy/blob/master/doc/basics.md#building-and-testing">https://github.com/rust-lang/rust-clippy/blob/master/doc/basics.md#building-and-testing</a> when i found this error.</p>
<div class="codehilite"><pre><span></span><code>TOML Caused by: redefinition of table `target.cfg(NOT_A_PLATFORM).dependencies` for key `target.cfg(NOT_A_PLATFORM).dependencies` at line 37 column 1
</code></pre></div>


<p>I have linked rustc into my local /rust-lang/rust and have checked the toml on clippy has change after i run <code>cargo dev ra-setup --repo-path &lt;repo-path&gt;</code>.<br>
i am using rustc 1.49.0-nightly</p>



<a name="214456787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214456787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214456787">(Oct 24 2020 at 23:56)</a>:</h4>
<p><span class="user-mention" data-user-id="343338">@Bimo</span> I'm not able to reproduce it locally, could you share your <code>Cargo.toml</code>?</p>



<a name="214457691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214457691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bimo <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214457691">(Oct 25 2020 at 00:17)</a>:</h4>
<p><span class="user-mention" data-user-id="279272">@Eduardo Broto</span> </p>
<div class="codehilite"><pre><span></span><code>[package]
name = &quot;clippy&quot;
version = &quot;0.0.212&quot;
authors = [
    &quot;Manish Goregaokar &lt;manishsmail@gmail.com&gt;&quot;,
    &quot;Andre Bogus &lt;bogusandre@gmail.com&gt;&quot;,
    &quot;Georg Brandl &lt;georg@python.org&gt;&quot;,
    &quot;Martin Carton &lt;cartonmartin@gmail.com&gt;&quot;,
    &quot;Oliver Schneider &lt;clippy-iethah7aipeen8neex1a@oli-obk.de&gt;&quot;
]
description = &quot;A bunch of helpful lints to avoid common pitfalls in Rust&quot;
repository = &quot;https://github.com/rust-lang/rust-clippy&quot;
readme = &quot;README.md&quot;
license = &quot;MIT OR Apache-2.0&quot;
keywords = [&quot;clippy&quot;, &quot;lint&quot;, &quot;plugin&quot;]
categories = [&quot;development-tools&quot;, &quot;development-tools::cargo-plugins&quot;]
build = &quot;build.rs&quot;
edition = &quot;2018&quot;
publish = false

[[bin]]
name = &quot;cargo-clippy&quot;
test = false
path = &quot;src/main.rs&quot;

[[bin]]
name = &quot;clippy-driver&quot;
path = &quot;src/driver.rs&quot;

[target.&#39;cfg(NOT_A_PLATFORM)&#39;.dependencies]
rustc_data_structures = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_data_structures&quot; }
rustc_driver = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_driver&quot; }
rustc_errors = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_errors&quot; }
rustc_interface = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_interface&quot; }
rustc_middle = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_middle&quot; }

[target.&#39;cfg(NOT_A_PLATFORM)&#39;.dependencies]
rustc_data_structures = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_data_structures&quot; }
rustc_driver = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_driver&quot; }
rustc_errors = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_errors&quot; }
rustc_interface = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_interface&quot; }
rustc_middle = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_middle&quot; }

[dependencies]
# begin automatic update
clippy_lints = { version = &quot;0.0.212&quot;, path = &quot;clippy_lints&quot; }
# end automatic update
semver = &quot;0.11&quot;
rustc_tools_util = { version = &quot;0.2.0&quot;, path = &quot;rustc_tools_util&quot;}
tempfile = { version = &quot;3.1.0&quot;, optional = true }

[dev-dependencies]
cargo_metadata = &quot;0.12&quot;
compiletest_rs = { version = &quot;0.5.0&quot;, features = [&quot;tmp&quot;] }
tester = &quot;0.7&quot;
clippy-mini-macro-test = { version = &quot;0.2&quot;, path = &quot;mini-macro&quot; }
serde = { version = &quot;1.0&quot;, features = [&quot;derive&quot;] }
derive-new = &quot;0.5&quot;

# A noop dependency that changes in the Rust repository, it&#39;s a bit of a hack.
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
# for more information.
rustc-workspace-hack = &quot;1.0.0&quot;

[build-dependencies]
rustc_tools_util = { version = &quot;0.2.0&quot;, path = &quot;rustc_tools_util&quot;}

[features]
deny-warnings = []
integration = [&quot;tempfile&quot;]
</code></pre></div>



<a name="214457833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214457833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214457833">(Oct 25 2020 at 00:21)</a>:</h4>
<p>I see, it seems that running <code>ra-setup</code> does not check if the information about dependencies was already added. I'll open an issue about that.</p>
<p>For the moment you can remove one of the duplicated blocks, from that <code>Cargo.toml</code> and from the one under <code>clippy_lints</code>.</p>



<a name="214457899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214457899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214457899">(Oct 25 2020 at 00:22)</a>:</h4>
<p>By duplicated blocks I mean to remove one of these:</p>
<div class="codehilite"><pre><span></span><code>[target.&#39;cfg(NOT_A_PLATFORM)&#39;.dependencies]
rustc_data_structures = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_data_structures&quot; }
rustc_driver = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_driver&quot; }
rustc_errors = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_errors&quot; }
rustc_interface = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_interface&quot; }
rustc_middle = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_middle&quot; }
</code></pre></div>



<a name="214458085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214458085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214458085">(Oct 25 2020 at 00:27)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust-clippy/issues/6220">clippy#6220</a></p>



<a name="214458172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/error%20when%20test%20clippy/near/214458172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bimo <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/error.20when.20test.20clippy.html#214458172">(Oct 25 2020 at 00:29)</a>:</h4>
<p>it works. <br>
btw, cargo toml on clippy-lints also has the same issue. </p>
<div class="codehilite"><pre><span></span><code>[package]
name = &quot;clippy_lints&quot;
# begin automatic update
version = &quot;0.0.212&quot;
# end automatic update
authors = [
    &quot;Manish Goregaokar &lt;manishsmail@gmail.com&gt;&quot;,
    &quot;Andre Bogus &lt;bogusandre@gmail.com&gt;&quot;,
    &quot;Georg Brandl &lt;georg@python.org&gt;&quot;,
    &quot;Martin Carton &lt;cartonmartin@gmail.com&gt;&quot;
]
description = &quot;A bunch of helpful lints to avoid common pitfalls in Rust&quot;
repository = &quot;https://github.com/rust-lang/rust-clippy&quot;
readme = &quot;README.md&quot;
license = &quot;MIT OR Apache-2.0&quot;
keywords = [&quot;clippy&quot;, &quot;lint&quot;, &quot;plugin&quot;]
edition = &quot;2018&quot;

[target.&#39;cfg(NOT_A_PLATFORM)&#39;.dependencies]
rustc_ast = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_ast&quot; }
rustc_ast_pretty = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_ast_pretty&quot; }
rustc_attr = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_attr&quot; }
rustc_data_structures = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_data_structures&quot; }
rustc_errors = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_errors&quot; }
rustc_hir = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_hir&quot; }
rustc_hir_pretty = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_hir_pretty&quot; }
rustc_index = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_index&quot; }
rustc_infer = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_infer&quot; }
rustc_lexer = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_lexer&quot; }
rustc_lint = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_lint&quot; }
rustc_middle = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_middle&quot; }
rustc_mir = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_mir&quot; }
rustc_parse = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_parse&quot; }
rustc_parse_format = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_parse_format&quot; }
rustc_session = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_session&quot; }
rustc_span = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_span&quot; }
rustc_target = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_target&quot; }
rustc_trait_selection = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_trait_selection&quot; }
rustc_typeck = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_typeck&quot; }

[target.&#39;cfg(NOT_A_PLATFORM)&#39;.dependencies]
rustc_ast = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_ast&quot; }
rustc_ast_pretty = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_ast_pretty&quot; }
rustc_attr = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_attr&quot; }
rustc_data_structures = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_data_structures&quot; }
rustc_errors = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_errors&quot; }
rustc_hir = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_hir&quot; }
rustc_hir_pretty = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_hir_pretty&quot; }
rustc_index = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_index&quot; }
rustc_infer = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_infer&quot; }
rustc_lexer = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_lexer&quot; }
rustc_lint = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_lint&quot; }
rustc_middle = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_middle&quot; }
rustc_mir = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_mir&quot; }
rustc_parse = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_parse&quot; }
rustc_parse_format = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_parse_format&quot; }
rustc_session = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_session&quot; }
rustc_span = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_span&quot; }
rustc_target = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_target&quot; }
rustc_trait_selection = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_trait_selection&quot; }
rustc_typeck = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_typeck&quot; }

[target.&#39;cfg(NOT_A_PLATFORM)&#39;.dependencies]
rustc_ast = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_ast&quot; }
rustc_ast_pretty = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_ast_pretty&quot; }
rustc_attr = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_attr&quot; }
rustc_data_structures = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_data_structures&quot; }
rustc_errors = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_errors&quot; }
rustc_hir = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_hir&quot; }
rustc_hir_pretty = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_hir_pretty&quot; }
rustc_index = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_index&quot; }
rustc_infer = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_infer&quot; }
rustc_lexer = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_lexer&quot; }
rustc_lint = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_lint&quot; }
rustc_middle = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_middle&quot; }
rustc_mir = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_mir&quot; }
rustc_parse = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_parse&quot; }
rustc_parse_format = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_parse_format&quot; }
rustc_session = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_session&quot; }
rustc_span = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_span&quot; }
rustc_target = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_target&quot; }
rustc_trait_selection = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_trait_selection&quot; }
rustc_typeck = { path = &quot;/home/bee/Code/rust/github.com/rust-lang/rust/compiler/rustc_typeck&quot; }

[dependencies]
cargo_metadata = &quot;0.12&quot;
if_chain = &quot;1.0.0&quot;
itertools = &quot;0.9&quot;
pulldown-cmark = { version = &quot;0.8&quot;, default-features = false }
quine-mc_cluskey = &quot;0.2.2&quot;
regex-syntax = &quot;0.6&quot;
serde = { version = &quot;1.0&quot;, features = [&quot;derive&quot;] }
smallvec = { version = &quot;1&quot;, features = [&quot;union&quot;] }
toml = &quot;0.5.3&quot;
unicode-normalization = &quot;0.1&quot;
semver = &quot;0.11&quot;
# NOTE: cargo requires serde feat in its url dep
# see &lt;https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864&gt;
url = { version =  &quot;2.1.0&quot;, features = [&quot;serde&quot;] }
quote = &quot;1&quot;
syn = { version = &quot;1&quot;, features = [&quot;full&quot;] }

[features]
deny-warnings = []
</code></pre></div>


<p>after i removed two identical blocks above, it can run test.<br>
Thank you</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>